package com.scientificInfo.dao;

import com.scientificInfo.bean.Teacher;
import com.scientificInfo.bean.TeacherExample;
import com.scientificInfo.bean.TeacherKey;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.web.bind.annotation.RequestParam;

public interface TeacherMapper {

    long countByExample(TeacherExample example);

    int deleteByExample(TeacherExample example);

    int deleteByPrimaryKey(TeacherKey key);

    int insert(Teacher record);

    int insertSelective(Teacher record);

    List<Teacher> selectByExample(TeacherExample example);

    Teacher selectByPrimaryKey(TeacherKey key);

    int updateByExampleSelective(@Param("record") Teacher record, @Param("example") TeacherExample example);

    int updateByExample(@Param("record") Teacher record, @Param("example") TeacherExample example);

    int updateByPrimaryKeySelective(Teacher record);

    int updateByPrimaryKey(Teacher record);

    int update(Teacher record);

    List<Teacher> selectByStatus(@Param("status") int status);

    @Update("update teacher set meetingid=#{newMeetingId} where teacherId=#{teacherId}")
    int updateByOne(@Param("teacherId") String teacherId, @Param("newMeetingId") int newMeetingId);

    @Select("select* from teacher where meetingid=#{meetingid}")
    List<Teacher> selectByMeetingId(@Param("meetingid") int meetingid);

}